package com.huawei.appgallery.dynamiccore.receiver;

import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import androidx.annotation.NonNull;
import com.huawei.secure.android.common.intent.SafeBroadcastReceiver;
import o.boc;
import o.bpp;
import o.ccx;

public class StartupReceiver extends SafeBroadcastReceiver {
    public static IntentFilter getIntentFilter() {
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction("com.huawei.appmarket.startup.flow.end");
        intentFilter.addAction("com.huawei.appmarket.startup.flow.interrupt");
        intentFilter.addAction("com.huawei.appmarket.startup.flow.error");
        intentFilter.addAction("com.huawei.appmarket.startup.flow.restart");
        return intentFilter;
    }

    public void onReceiveMsg(@NonNull Context context, @NonNull Intent intent) {
        if ("com.huawei.appmarket.startup.flow.end".equals(intent.getAction())) {
            boc.ˎ.ˋ("StartupReceiver", "Startup success, isSigned: " + ccx.ॱ());
            bpp.ˏ().ˎ();
        }
        if ("com.huawei.appmarket.startup.flow.interrupt".equals(intent.getAction()) || "com.huawei.appmarket.startup.flow.error".equals(intent.getAction()) || "com.huawei.appmarket.startup.flow.restart".equals(intent.getAction())) {
            boc.ˎ.ˋ("StartupReceiver", "Startup failure.");
            bpp.ˏ().ˋ();
        }
    }
}
